package sheji.jianZao.chouXiangGongChang;

public class Demo {

    public static void main(String[] args) {
        AbstractFactory factory1 = new ConcreteFactory1();
        AbstractFactory factory2 = new ConcreteFactory2();

        ProductA a1 = factory1.factoryA();
        ProductA a2 = factory2.factoryA();
        ProductB b1 = factory1.factoryB();
        ProductB b2 = factory2.factoryB();

        a1.method1();
        a2.method1();
        b1.method1();
        b2.method1();

    }

}
